<%@ page language="java" contentType="text/html; charset=US-ASCII"
    pageEncoding="US-ASCII"%>
<%@ page import="java.util.*"%>
<%@ page import="fr.esgi.donnees.Database"%>
<%@ page import="fr.esgi.classes.Soutenance"%>
<%@ page import="fr.esgi.classes.Personne"%>
<%
 	String  projet=request.getParameter("id_projet");
	ArrayList <Soutenance>soutenances=new ArrayList<Soutenance>();
 	Database c = new Database();
 	soutenances = c.afficherSoutenance(projet);

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title></title>
</head>
<body>
<table border='2'>
		<tr>
			<!-- 			<TH>ID</th> -->
			<th>numero groupe</th>
			<th>étudiants</th>
			<th>horaire</th>
			<th>date</th>
		</tr>
		<%
			for (int i = 0; i < soutenances.size(); i++) {
				String s="";
				out.print("<tr>");
				out.print("<td>" + soutenances.get(i).getIdEquipe() + "</td>");
				ArrayList <Personne>personnes=new ArrayList<Personne>();
				personnes=c.recuperationEtudiant(projet,String.valueOf(soutenances.get(i).getIdEquipe()));
 				for(int j=0;j<personnes.size();j++){
				
 					s=s+personnes.get(j).getPrenom()+" "+personnes.get(j).getNom()+", ";
 				}
				out.print("<td>"+ s+"</td>");
				out.print("<td>" + soutenances.get(i).getHoraire()+ "</td>");
				out.print("<td>" + soutenances.get(i).getDate() + "</td>");
			}
		%>

	</table>

</body>
</html>